﻿//16.Write a program that reads two dates in the format: day.month.year and calculates the number of days between them.
//Example: Enter the first date: 27.02.2006
//Enter the second date: 3.03.2004
//Distance: 4 days

using System;
using System.Globalization;

namespace CalcDateDifference
{
    class CalcDateDifference
    {
        static void Main()
        {
            Console.Write("Start date: ");
            string start = Console.ReadLine();
            Console.Write("End date: ");
            string end = Console.ReadLine();

            DateTime startDate = DateTime.ParseExact(start, "dd.MM.yyyy", CultureInfo.InvariantCulture);
            Console.WriteLine(startDate);
            DateTime endDate = DateTime.ParseExact(end, "dd.MM.yyyy", CultureInfo.InvariantCulture);
            Console.WriteLine(endDate);
            TimeSpan ts = endDate.Subtract(startDate);
            Console.WriteLine(ts);
        }
    }
}
